Skip to content

Frontapp new components #17689

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Frontapp new components #17689

wants to merge 7 commits into from

Conversation

GTFalcao
Copy link
Collaborator

@GTFalcao GTFalcao commented Jul 17, 2025

Closes #17465

Summary by CodeRabbit

  • New Features

    • Added actions to create inboxes, create and delete message templates, list message templates with sorting options, and update teammate details including custom fields and availability for FrontApp integration.
    • Enabled selection of message templates and folders via new dropdown options.
    • Introduced new event sources for detecting newly created conversations and message templates.
    • Added a polling source for incremental event emission with saved state management.
  • Bug Fixes

    • No bug fixes included in this release.
  • Documentation

    • Improved action and component descriptions for clarity, replacing "docs" with "documentation" in multiple places.
  • Chores

    • Updated package version to 0.7.0 and upgraded platform dependency.
    • Incremented versions of multiple existing actions and sources without functional changes.

Copy link

vercel bot commented Jul 17, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs-v2 ⬜️ Ignored (Inspect) Visit Preview Jul 18, 2025 8:19pm
pipedream-docs ⬜️ Ignored (Inspect) Jul 18, 2025 8:19pm
pipedream-docs-redirect-do-not-edit ⬜️ Ignored (Inspect) Jul 18, 2025 8:19pm

Copy link
Contributor

coderabbitai bot commented Jul 17, 2025

Walkthrough

This update introduces several new FrontApp actions, including creating inboxes, creating and deleting message templates, updating teammates, and listing message templates. The FrontApp app module is extended with new prop definitions and methods to support these features. New source components for new conversation and message template creation events are added. Several action descriptions are revised for clarity, and package dependencies are updated.

Changes

File(s) Change Summary
components/frontapp/actions/create-inbox/create-inbox.mjs New action: Create Inbox for FrontApp, allowing creation of an inbox with optional teammate access.
components/frontapp/actions/create-message-template/create-message-template.mjs New action: Create Message Template, supporting attachments and folder selection.
components/frontapp/actions/delete-message-template/delete-message-template.mjs New action: Delete Message Template by ID.
components/frontapp/actions/list-message-templates/list-message-templates.mjs New action: List Message Templates with optional sorting.
components/frontapp/actions/update-teammate/update-teammate.mjs New action: Update Teammate, allowing updates to teammate details and custom fields.
components/frontapp/frontapp.app.mjs Added prop definitions and methods for message templates, folders, teammates, inbox creation, and deletion.
components/frontapp/sources/common/polling-ids.mjs New polling source module for incremental event emission with saved IDs and deploy hook.
components/frontapp/sources/new-conversation-created/new-conversation-created.mjs New source: Emit event on new conversation creation with metadata and deduplication.
components/frontapp/sources/new-conversation-created/test-event.mjs New test event object representing a new conversation created event.
components/frontapp/sources/new-message-template-created/new-message-template-created.mjs New source: Emit event on new message template creation with metadata and deduplication.
components/frontapp/sources/new-message-template-created/test-event.mjs New test event object representing a new message template creation event.
components/frontapp/actions/import-message/import-message.mjs Description text updated for clarity.
components/frontapp/actions/receive-custom-messages/receive-custom-messages.mjs Description wording updated and version incremented.
components/frontapp/actions/reply-to-conversation/reply-to-conversation.mjs Description wording updated and version incremented.
components/frontapp/actions/send-new-message/send-new-message.mjs Description wording updated and version incremented.
components/frontapp/actions/update-conversation/update-conversation.mjs Description wording updated and version incremented.
components/frontapp/package.json Package version bumped to 0.7.0; platform dependency updated to ^3.1.0.
components/frontapp/sources/new-conversation-state-change/new-conversation-state-change.mjs Description wording updated and version incremented.
components/frontapp/actions/add-comment/add-comment.mjs Version increment only (0.0.1 → 0.0.2).
components/frontapp/actions/archive-conversation/archive-conversation.mjs Version increment only (0.0.1 → 0.0.2).
components/frontapp/actions/assign-conversation/assign-conversation.mjs Version increment only (0.0.1 → 0.0.2).
components/frontapp/actions/create-draft-reply/create-draft-reply.mjs Version increment only (0.0.1 → 0.0.2).
components/frontapp/actions/create-draft/create-draft.mjs Version increment only (0.0.1 → 0.0.2).
components/frontapp/actions/get-comment/get-comment.mjs Version increment only (0.0.1 → 0.0.2).
components/frontapp/actions/get-teammate/get-teammate.mjs Version increment only (0.0.1 → 0.0.2).
components/frontapp/actions/list-comment-mentions/list-comment-mentions.mjs Version increment only (0.0.1 → 0.0.2).
components/frontapp/actions/list-comments/list-comments.mjs Version increment only (0.0.1 → 0.0.2).
components/frontapp/actions/list-conversations/list-conversations.mjs Version increment only (0.0.1 → 0.0.2).
components/frontapp/actions/list-teammates/list-teammates.mjs Version increment only (0.0.1 → 0.0.2).
components/frontapp/actions/tag-conversation/tag-conversation.mjs Version increment only (0.0.1 → 0.0.2).
components/frontapp/sources/new-conversation-tag/new-conversation-tag.mjs Version increment only (0.0.2 → 0.0.3).

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Action
    participant FrontAppClient
    participant Front API

    User->>Action: Trigger action (e.g., Create Inbox, Update Teammate)
    Action->>FrontAppClient: Prepare data and call method (e.g., createInbox, updateTeammate)
    FrontAppClient->>Front API: Send HTTP request (POST/PATCH/DELETE/GET)
    Front API-->>FrontAppClient: Respond with result
    FrontAppClient-->>Action: Return API response
    Action-->>User: Output summary and result
Loading

Suggested labels

ai-assisted

Suggested reviewers

  • michelle0927

Poem

🐇 In code's green meadow, I leap and bound,
New FrontApp actions and sources found.
Inboxes bloom, teammates renew,
Templates crafted fresh and true.
With every hop, new features grow,
A rabbit's joy in every flow! 🌿✨

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

components/frontapp/actions/create-message-template/create-message-template.mjs

Oops! Something went wrong! :(

ESLint: 8.57.1

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs
at Object.getPackageJSONURL (node:internal/modules/package_json_reader:255:9)
at packageResolve (node:internal/modules/esm/resolve:767:81)
at moduleResolve (node:internal/modules/esm/resolve:853:18)
at defaultResolve (node:internal/modules/esm/resolve:983:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:801:12)
at #cachedDefaultResolve (node:internal/modules/esm/loader:725:25)
at ModuleLoader.resolve (node:internal/modules/esm/loader:708:38)
at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:309:38)
at #link (node:internal/modules/esm/module_job:202:49)


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 10ae11b and 7c5ca08.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (1)
  • components/frontapp/actions/create-message-template/create-message-template.mjs (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • components/frontapp/actions/create-message-template/create-message-template.mjs
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Lint Code Base
  • GitHub Check: Publish TypeScript components
  • GitHub Check: Verify TypeScript components
✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (2)
components/frontapp/actions/reply-to-conversation/reply-to-conversation.mjs (1)

7-9: Update summary string to match action intent

The action now only updates metadata, but the $summary emitted by run() still says “updated conversation” instead of “replied to conversation”, which can confuse users.

-$.export("$summary", `Successfully updated conversation with ID ${conversationId}`);
+$.export("$summary", `Successfully replied to conversation with ID ${conversationId}`);

Also applies to: 164-165

components/frontapp/frontapp.app.mjs (1)

548-591: Use consistent HTTP method constants.

The new methods are well-implemented but use inconsistent HTTP method specification. Some methods use lowercase strings while others use constants.METHOD.

Apply this diff to maintain consistency:

    async updateTeammate({
      teammateId, ...args
    } = {}) {
      return this.makeRequest({
-        method: "patch",
+        method: constants.METHOD.PATCH,
        path: `/teammates/${teammateId}`,
        ...args,
      });
    },
    async createInbox(args = {}) {
      return this.makeRequest({
-        method: "post",
+        method: constants.METHOD.POST,
        path: "/inboxes",
        ...args,
      });
    },
    async createMessageTemplate(args = {}) {
      return this.makeRequest({
-        method: "post",
+        method: constants.METHOD.POST,
        path: "/message_templates",
        ...args,
      });
    },
    async deleteMessageTemplate({
      messageTemplateId, ...args
    } = {}) {
      return this.makeRequest({
-        method: "delete",
+        method: constants.METHOD.DELETE,
        path: `/message_templates/${messageTemplateId}`,
        ...args,
      });
    },
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 50c8bfe and 99f6ccf.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (13)
  • components/frontapp/actions/create-inbox/create-inbox.mjs (1 hunks)
  • components/frontapp/actions/create-message-template/create-message-template.mjs (1 hunks)
  • components/frontapp/actions/delete-message-template/delete-message-template.mjs (1 hunks)
  • components/frontapp/actions/import-message/import-message.mjs (1 hunks)
  • components/frontapp/actions/list-message-templates/list-message-templates.mjs (1 hunks)
  • components/frontapp/actions/receive-custom-messages/receive-custom-messages.mjs (1 hunks)
  • components/frontapp/actions/reply-to-conversation/reply-to-conversation.mjs (1 hunks)
  • components/frontapp/actions/send-new-message/send-new-message.mjs (1 hunks)
  • components/frontapp/actions/update-conversation/update-conversation.mjs (1 hunks)
  • components/frontapp/actions/update-teammate/update-teammate.mjs (1 hunks)
  • components/frontapp/frontapp.app.mjs (2 hunks)
  • components/frontapp/package.json (2 hunks)
  • components/frontapp/sources/new-conversation-state-change/new-conversation-state-change.mjs (1 hunks)
🧰 Additional context used
🧠 Learnings (13)
components/frontapp/sources/new-conversation-state-change/new-conversation-state-change.mjs (1)
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#15376
File: components/monday/sources/name-updated/name-updated.mjs:6-6
Timestamp: 2025-01-23T03:55:15.166Z
Learning: Source names in Monday.com components don't need to start with "New" if they emit events for updated items (e.g., "Name Updated", "Column Value Updated") rather than new items. This follows the component guidelines exception where the "New" prefix is only required when emits are limited to new items.
components/frontapp/actions/import-message/import-message.mjs (5)
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-10-08T15:33:38.240Z
Learning: When exporting a summary message in the `run` method of an action, ensure the message is correctly formatted. For example, in the `hackerone-get-members` action, the correct format is `Successfully retrieved ${response.data.length} members`.
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-07-04T18:11:59.822Z
Learning: When exporting a summary message in the `run` method of an action, ensure the message is correctly formatted. For example, in the `hackerone-get-members` action, the correct format is `Successfully retrieved ${response.data.length} members`.
Learnt from: jcortes
PR: PipedreamHQ/pipedream#14467
File: components/gainsight_px/actions/create-account/create-account.mjs:4-6
Timestamp: 2024-10-30T15:24:39.294Z
Learning: In `components/gainsight_px/actions/create-account/create-account.mjs`, the action name should be "Create Account" instead of "Create Memory".
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#14229
File: components/americommerce/actions/change-order-status/change-order-status.mjs:6-6
Timestamp: 2024-10-08T16:43:04.167Z
Learning: When providing action descriptions in the AmeriCommerce components, avoid unnecessary details and include a link to the relevant documentation instead.
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#15376
File: components/monday/sources/column-value-updated/column-value-updated.mjs:17-24
Timestamp: 2025-01-23T03:55:51.998Z
Learning: Alert props in Pipedream components are a special case that do not require a label property, and use the 'content' property as a replacement for description.
components/frontapp/package.json (1)
Learnt from: jcortes
PR: PipedreamHQ/pipedream#14935
File: components/sailpoint/package.json:15-18
Timestamp: 2024-12-12T19:23:09.039Z
Learning: When developing Pipedream components, do not add built-in Node.js modules like `fs` to `package.json` dependencies, as they are native modules provided by the Node.js runtime.
components/frontapp/actions/create-message-template/create-message-template.mjs (3)
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-10-08T15:33:38.240Z
Learning: When exporting a summary message in the `run` method of an action, ensure the message is correctly formatted. For example, in the `hackerone-get-members` action, the correct format is `Successfully retrieved ${response.data.length} members`.
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-07-04T18:11:59.822Z
Learning: When exporting a summary message in the `run` method of an action, ensure the message is correctly formatted. For example, in the `hackerone-get-members` action, the correct format is `Successfully retrieved ${response.data.length} members`.
Learnt from: jcortes
PR: PipedreamHQ/pipedream#14467
File: components/gainsight_px/actions/create-account/create-account.mjs:4-6
Timestamp: 2024-10-30T15:24:39.294Z
Learning: In `components/gainsight_px/actions/create-account/create-account.mjs`, the action name should be "Create Account" instead of "Create Memory".
components/frontapp/actions/reply-to-conversation/reply-to-conversation.mjs (3)
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-07-04T18:11:59.822Z
Learning: When exporting a summary message in the `run` method of an action, ensure the message is correctly formatted. For example, in the `hackerone-get-members` action, the correct format is `Successfully retrieved ${response.data.length} members`.
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-10-08T15:33:38.240Z
Learning: When exporting a summary message in the `run` method of an action, ensure the message is correctly formatted. For example, in the `hackerone-get-members` action, the correct format is `Successfully retrieved ${response.data.length} members`.
Learnt from: jcortes
PR: PipedreamHQ/pipedream#14467
File: components/gainsight_px/actions/create-account/create-account.mjs:4-6
Timestamp: 2024-10-30T15:24:39.294Z
Learning: In `components/gainsight_px/actions/create-account/create-account.mjs`, the action name should be "Create Account" instead of "Create Memory".
components/frontapp/actions/delete-message-template/delete-message-template.mjs (2)
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-10-08T15:33:38.240Z
Learning: When exporting a summary message in the `run` method of an action, ensure the message is correctly formatted. For example, in the `hackerone-get-members` action, the correct format is `Successfully retrieved ${response.data.length} members`.
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-07-04T18:11:59.822Z
Learning: When exporting a summary message in the `run` method of an action, ensure the message is correctly formatted. For example, in the `hackerone-get-members` action, the correct format is `Successfully retrieved ${response.data.length} members`.
components/frontapp/actions/update-conversation/update-conversation.mjs (3)
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-07-04T18:11:59.822Z
Learning: When exporting a summary message in the `run` method of an action, ensure the message is correctly formatted. For example, in the `hackerone-get-members` action, the correct format is `Successfully retrieved ${response.data.length} members`.
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-10-08T15:33:38.240Z
Learning: When exporting a summary message in the `run` method of an action, ensure the message is correctly formatted. For example, in the `hackerone-get-members` action, the correct format is `Successfully retrieved ${response.data.length} members`.
Learnt from: jcortes
PR: PipedreamHQ/pipedream#14467
File: components/gainsight_px/actions/create-account/create-account.mjs:4-6
Timestamp: 2024-10-30T15:24:39.294Z
Learning: In `components/gainsight_px/actions/create-account/create-account.mjs`, the action name should be "Create Account" instead of "Create Memory".
components/frontapp/actions/receive-custom-messages/receive-custom-messages.mjs (4)
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-07-04T18:11:59.822Z
Learning: When exporting a summary message in the `run` method of an action, ensure the message is correctly formatted. For example, in the `hackerone-get-members` action, the correct format is `Successfully retrieved ${response.data.length} members`.
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-10-08T15:33:38.240Z
Learning: When exporting a summary message in the `run` method of an action, ensure the message is correctly formatted. For example, in the `hackerone-get-members` action, the correct format is `Successfully retrieved ${response.data.length} members`.
Learnt from: jcortes
PR: PipedreamHQ/pipedream#14467
File: components/gainsight_px/actions/create-account/create-account.mjs:4-6
Timestamp: 2024-10-30T15:24:39.294Z
Learning: In `components/gainsight_px/actions/create-account/create-account.mjs`, the action name should be "Create Account" instead of "Create Memory".
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#15376
File: components/monday/sources/column-value-updated/column-value-updated.mjs:17-24
Timestamp: 2025-01-23T03:55:51.998Z
Learning: Alert props in Pipedream components are a special case that do not require a label property, and use the 'content' property as a replacement for description.
components/frontapp/actions/send-new-message/send-new-message.mjs (3)
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-10-08T15:33:38.240Z
Learning: When exporting a summary message in the `run` method of an action, ensure the message is correctly formatted. For example, in the `hackerone-get-members` action, the correct format is `Successfully retrieved ${response.data.length} members`.
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-07-04T18:11:59.822Z
Learning: When exporting a summary message in the `run` method of an action, ensure the message is correctly formatted. For example, in the `hackerone-get-members` action, the correct format is `Successfully retrieved ${response.data.length} members`.
Learnt from: jcortes
PR: PipedreamHQ/pipedream#14467
File: components/gainsight_px/actions/create-account/create-account.mjs:4-6
Timestamp: 2024-10-30T15:24:39.294Z
Learning: In `components/gainsight_px/actions/create-account/create-account.mjs`, the action name should be "Create Account" instead of "Create Memory".
components/frontapp/actions/update-teammate/update-teammate.mjs (2)
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-10-08T15:33:38.240Z
Learning: When exporting a summary message in the `run` method of an action, ensure the message is correctly formatted. For example, in the `hackerone-get-members` action, the correct format is `Successfully retrieved ${response.data.length} members`.
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-07-04T18:11:59.822Z
Learning: When exporting a summary message in the `run` method of an action, ensure the message is correctly formatted. For example, in the `hackerone-get-members` action, the correct format is `Successfully retrieved ${response.data.length} members`.
components/frontapp/actions/list-message-templates/list-message-templates.mjs (2)
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-07-04T18:11:59.822Z
Learning: When exporting a summary message in the `run` method of an action, ensure the message is correctly formatted. For example, in the `hackerone-get-members` action, the correct format is `Successfully retrieved ${response.data.length} members`.
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-10-08T15:33:38.240Z
Learning: When exporting a summary message in the `run` method of an action, ensure the message is correctly formatted. For example, in the `hackerone-get-members` action, the correct format is `Successfully retrieved ${response.data.length} members`.
components/frontapp/actions/create-inbox/create-inbox.mjs (1)
Learnt from: jcortes
PR: PipedreamHQ/pipedream#14467
File: components/gainsight_px/actions/create-account/create-account.mjs:4-6
Timestamp: 2024-10-30T15:24:39.294Z
Learning: In `components/gainsight_px/actions/create-account/create-account.mjs`, the action name should be "Create Account" instead of "Create Memory".
components/frontapp/frontapp.app.mjs (1)
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#16954
File: components/salesloft/salesloft.app.mjs:14-23
Timestamp: 2025-06-04T17:52:05.780Z
Learning: In the Salesloft API integration (components/salesloft/salesloft.app.mjs), the _makeRequest method returns response.data which directly contains arrays for list endpoints like listPeople, listCadences, listUsers, and listAccounts. The propDefinitions correctly call .map() directly on these responses without needing to destructure a nested data property.
🧬 Code Graph Analysis (2)
components/frontapp/actions/delete-message-template/delete-message-template.mjs (2)
components/frontapp/actions/list-message-templates/list-message-templates.mjs (1)
  • response (45-48)
components/frontapp/actions/create-message-template/create-message-template.mjs (1)
  • response (100-104)
components/frontapp/actions/list-message-templates/list-message-templates.mjs (7)
components/frontapp/actions/delete-message-template/delete-message-template.mjs (1)
  • response (25-28)
components/frontapp/actions/create-inbox/create-inbox.mjs (1)
  • response (39-42)
components/frontapp/actions/import-message/import-message.mjs (1)
  • response (186-190)
components/frontapp/actions/receive-custom-messages/receive-custom-messages.mjs (1)
  • response (137-137)
components/frontapp/actions/send-new-message/send-new-message.mjs (1)
  • response (154-154)
components/frontapp/actions/create-message-template/create-message-template.mjs (1)
  • response (100-104)
components/frontapp/actions/tag-conversation/tag-conversation.mjs (1)
  • frontApp (30-33)
🔇 Additional comments (16)
components/frontapp/actions/import-message/import-message.mjs (1)

7-8: Consistent wording update – no further action required

The switch from “docs” to “documentation” brings this description in line with the rest of the FrontApp components. No functional impact.

components/frontapp/package.json (1)

3-4: Confirmed: @pipedream/platform v3.1.0 is published
Verified that version 3.1.0 exists in the npm registry. No further action required.

• components/frontapp/package.json (dependency ^3.1.0)

components/frontapp/sources/new-conversation-state-change/new-conversation-state-change.mjs (1)

9-11: Metadata touch-up looks good

Description wording and version bump are fine; no logic affected.

Also applies to: 18-19

components/frontapp/actions/update-conversation/update-conversation.mjs (1)

7-9: Description/version bump is fine

No functional changes. Implementation already exports an accurate summary and correct payload.

components/frontapp/actions/delete-message-template/delete-message-template.mjs (2)

1-33: LGTM! Clean implementation of delete action.

The action follows established patterns correctly with proper imports, metadata, prop definitions, and API method usage. The implementation is concise and appropriate for a delete operation.


30-30: Summary message format is correct.

The summary message follows the proper format as indicated in the retrieved learnings, using a template string with the relevant identifier.

components/frontapp/actions/receive-custom-messages/receive-custom-messages.mjs (1)

7-8: LGTM! Consistent metadata updates.

The description standardization from "docs" to "documentation" and version increment align with the broader PR pattern of updating FrontApp action metadata.

components/frontapp/actions/send-new-message/send-new-message.mjs (1)

7-8: LGTM! Consistent metadata updates.

The description standardization from "docs" to "documentation" and version increment follow the same pattern as other FrontApp actions in this PR.

components/frontapp/actions/create-message-template/create-message-template.mjs (3)

1-3: LGTM! Proper imports for file handling.

The imports correctly include FormData and getFileStreamAndMetadata for handling file attachments in the message template creation.


67-88: Well-implemented attachment handling.

The conditional FormData usage for attachments is properly implemented with correct stream handling and metadata extraction. The fallback to JSON for requests without attachments is appropriate.


106-106: Summary message format is correct.

The summary message uses the template name variable and follows the proper format consistent with the retrieved learnings.

components/frontapp/actions/create-inbox/create-inbox.mjs (2)

1-47: LGTM! Clean and straightforward inbox creation action.

The implementation follows established patterns correctly with proper metadata, prop definitions, and API method usage. The action is well-structured and appropriate for inbox creation functionality.


44-44: Summary message format is correct.

The summary message properly uses the inbox name variable and follows the expected format pattern.

components/frontapp/actions/update-teammate/update-teammate.mjs (1)

1-78: LGTM! Well-structured action implementation.

The action is correctly implemented with proper prop definitions, data transformation, and API integration. The summary message formatting follows the established pattern from the learnings.

components/frontapp/actions/list-message-templates/list-message-templates.mjs (1)

1-55: LGTM! Proper implementation of list action with pagination support.

The action correctly implements listing with optional sorting parameters, proper response handling for paginated results, and follows the established summary message format from the learnings.

components/frontapp/frontapp.app.mjs (1)

276-310: LGTM! Well-implemented propDefinitions with proper pagination support.

The new messageTemplateId and folderId propDefinitions follow the established pattern with async options loading and proper mapping functions.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
components/frontapp/sources/common/polling-ids.mjs (1)

15-45: Verify the abstract method pattern is documented.

This common module follows an abstract class pattern where extending modules must implement getItems(), getItemId(), and generateMeta() methods. Consider adding JSDoc comments to document these required methods for better developer experience.

  methods: {
+   /**
+    * Abstract methods that must be implemented by extending modules:
+    * - async getItems(savedIds): Fetch items from the API
+    * - getItemId(item): Extract unique ID from an item
+    * - generateMeta(item): Generate event metadata for an item
+    */
    _getSavedIds() {

Consider adding error handling for API calls.

The startEvent method assumes this.getItems() will always succeed. Consider wrapping the API call in try-catch to handle potential failures gracefully.

    async startEvent(maxItems) {
      const savedIds = this._getSavedIds();
-     const items = await this.getItems(savedIds);
+     try {
+       const items = await this.getItems(savedIds);
+       // ... rest of the logic
+     } catch (error) {
+       console.error("Error fetching items:", error);
+       return;
+     }
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 97c7644 and 25bc805.

📒 Files selected for processing (5)
  • components/frontapp/sources/common/polling-ids.mjs (1 hunks)
  • components/frontapp/sources/new-conversation-created/new-conversation-created.mjs (1 hunks)
  • components/frontapp/sources/new-conversation-created/test-event.mjs (1 hunks)
  • components/frontapp/sources/new-message-template-created/new-message-template-created.mjs (1 hunks)
  • components/frontapp/sources/new-message-template-created/test-event.mjs (1 hunks)
✅ Files skipped from review due to trivial changes (2)
  • components/frontapp/sources/new-message-template-created/test-event.mjs
  • components/frontapp/sources/new-conversation-created/test-event.mjs
🧰 Additional context used
🧠 Learnings (3)
components/frontapp/sources/common/polling-ids.mjs (2)
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#14265
File: components/the_magic_drip/sources/common.mjs:35-43
Timestamp: 2024-10-10T19:18:27.998Z
Learning: In `components/the_magic_drip/sources/common.mjs`, when processing items in `getAndProcessData`, `savedIds` is intentionally updated with IDs of both emitted and non-emitted items to avoid emitting retroactive events upon first deployment and ensure only new events are emitted as they occur.
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#12697
File: components/salesforce_rest_api/sources/common.mjs:97-98
Timestamp: 2024-07-24T02:05:59.531Z
Learning: The `processTimerEvent` method in the `components/salesforce_rest_api/sources/common.mjs` file is intentionally left unimplemented to enforce that subclasses must implement this method, similar to an abstract class in object-oriented programming.
components/frontapp/sources/new-message-template-created/new-message-template-created.mjs (4)
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#14265
File: components/the_magic_drip/sources/common.mjs:35-43
Timestamp: 2024-10-10T19:18:27.998Z
Learning: In `components/the_magic_drip/sources/common.mjs`, when processing items in `getAndProcessData`, `savedIds` is intentionally updated with IDs of both emitted and non-emitted items to avoid emitting retroactive events upon first deployment and ensure only new events are emitted as they occur.
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#15376
File: components/monday/sources/name-updated/name-updated.mjs:6-6
Timestamp: 2025-01-23T03:55:15.166Z
Learning: Source names in Monday.com components don't need to start with "New" if they emit events for updated items (e.g., "Name Updated", "Column Value Updated") rather than new items. This follows the component guidelines exception where the "New" prefix is only required when emits are limited to new items.
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#12697
File: components/salesforce_rest_api/sources/common-webhook-methods.mjs:1-71
Timestamp: 2024-10-08T15:33:38.240Z
Learning: The `common-webhook-methods.mjs` object is designed to be extended, similar to an abstract class, and intentionally does not implement certain methods like `generateWebhookMeta` and `getEventType` to enforce implementation in subclasses.
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#12697
File: components/salesforce_rest_api/sources/common-webhook-methods.mjs:1-71
Timestamp: 2024-07-24T02:06:47.016Z
Learning: The `common-webhook-methods.mjs` object is designed to be extended, similar to an abstract class, and intentionally does not implement certain methods like `generateWebhookMeta` and `getEventType` to enforce implementation in subclasses.
components/frontapp/sources/new-conversation-created/new-conversation-created.mjs (4)
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#14265
File: components/the_magic_drip/sources/common.mjs:35-43
Timestamp: 2024-10-10T19:18:27.998Z
Learning: In `components/the_magic_drip/sources/common.mjs`, when processing items in `getAndProcessData`, `savedIds` is intentionally updated with IDs of both emitted and non-emitted items to avoid emitting retroactive events upon first deployment and ensure only new events are emitted as they occur.
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#15376
File: components/monday/sources/name-updated/name-updated.mjs:6-6
Timestamp: 2025-01-23T03:55:15.166Z
Learning: Source names in Monday.com components don't need to start with "New" if they emit events for updated items (e.g., "Name Updated", "Column Value Updated") rather than new items. This follows the component guidelines exception where the "New" prefix is only required when emits are limited to new items.
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#12697
File: components/salesforce_rest_api/sources/common-webhook-methods.mjs:1-71
Timestamp: 2024-10-08T15:33:38.240Z
Learning: The `common-webhook-methods.mjs` object is designed to be extended, similar to an abstract class, and intentionally does not implement certain methods like `generateWebhookMeta` and `getEventType` to enforce implementation in subclasses.
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#12697
File: components/salesforce_rest_api/sources/common-webhook-methods.mjs:1-71
Timestamp: 2024-07-24T02:06:47.016Z
Learning: The `common-webhook-methods.mjs` object is designed to be extended, similar to an abstract class, and intentionally does not implement certain methods like `generateWebhookMeta` and `getEventType` to enforce implementation in subclasses.
🧬 Code Graph Analysis (2)
components/frontapp/sources/new-message-template-created/new-message-template-created.mjs (2)
components/heygen/actions/create-video-from-template/create-video-from-template.mjs (1)
  • template (70-73)
components/frontapp/sources/new-conversation-created/new-conversation-created.mjs (1)
  • response (25-30)
components/frontapp/sources/new-conversation-created/new-conversation-created.mjs (1)
components/frontapp/sources/new-message-template-created/new-message-template-created.mjs (1)
  • response (25-30)
🔇 Additional comments (6)
components/frontapp/sources/common/polling-ids.mjs (2)

1-14: LGTM! Clean module structure.

The imports and props configuration follow Pipedream source conventions correctly.


47-54: LGTM! Follows Pipedream polling source best practices.

The run() method and deploy() hook implementation correctly limits initial emissions to 5 items during deployment, preventing overwhelming users with historical data.

components/frontapp/sources/new-conversation-created/new-conversation-created.mjs (3)

1-11: LGTM! Proper source configuration.

The imports, naming, and metadata follow Pipedream source conventions correctly. The "New" prefix is appropriate since this source emits events only for new conversations.


35-35: LGTM! Sample emit inclusion follows best practices.

Including sample emit data supports proper testing and development workflow.


12-33: Confirm correct sort_by field for listing conversations

I wasn’t able to find any examples in the codebase indicating whether the FrontApp API expects sort_by: "date" or sort_by: "created_at" when calling listConversations. Please verify against the official FrontApp documentation and update if needed:

  • File: components/frontapp/sources/new-conversation-created/new-conversation-created.mjs
    Method: getItems (around line 32)

The fallback to response._results || [] is good to keep.

components/frontapp/sources/new-message-template-created/new-message-template-created.mjs (1)

1-36: LGTM! Consistent implementation with appropriate field mappings.

This source correctly follows the same pattern as the conversation source with appropriate field adaptations:

  • Uses template.name for summary (vs conversation.subject)
  • Uses "created_at" for sorting (vs "date")
  • Maintains consistent error handling with response._results || [] fallback

The implementation properly extends the common polling module and follows Pipedream source conventions.

frontApp,
sortBy: {
type: "string",
label: "Sort By",
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: the docs do not mention a page or per_page parameter for this endpoint at all

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docs show it uses a page_token instead. This action should have a maxResults prop and return a paginated list as the result. Note: You can look at how the messageTemplateId prop uses pagination.

Copy link
Collaborator

@luancazarine luancazarine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @GTFalcao, LGTM! Ready for QA!

Comment on lines +46 to +51
attachments: {
propDefinition: [
frontApp,
"attachments",
],
},
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we're supposed to be adding syncDir to components that work with the /tmp directory.

Suggested change
attachments: {
propDefinition: [
frontApp,
"attachments",
],
},
attachments: {
propDefinition: [
frontApp,
"attachments",
],
},
syncDir: {
type: "dir",
accessMode: "write",
sync: true,
},

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The syncDir prop has to do with File Stash. https://pipedream.com/docs/connect/components/files

frontApp,
sortBy: {
type: "string",
label: "Sort By",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docs show it uses a page_token instead. This action should have a maxResults prop and return a paginated list as the result. Note: You can look at how the messageTemplateId prop uses pagination.

Comment on lines +16 to +21
_getSavedIds() {
return this.db.get("savedIds") || [];
},
_setSavedIds(ids) {
this.db.set("savedIds", ids);
},
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be simpler to use a timestamp to check the events, rather than storing all the ID's?

If that's not an option, storing the ID's in an object (e.g. { 123: true, 456: true }) would reduce execution time. Checking whether savedIds[id] is true is faster than using savedIds.includes().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Front
3 participants